<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <button>删除</button>
    <ul>
        <li>熊大</li>
        <li>熊二</li>
        <li>光头强</li>
    </ul>
    <script>
        document.querySelector('button').onclick = function() {
            let ulDel = document.querySelector('ul');
            ulDel.removeChild(ulDel.children[0]);
            if (ulDel.children.length == 0) {
                this.disabled = true;
            }
        }
    </script>
</body>

</html>